home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / lookhere / lookhere.frm < prev    next >
Text File  |  1995-05-08  |  6KB  |  248 lines

  1. VERSION 2.00
  2. Begin Form LookHere 
  3.    Caption         =   "Lookie Here! Fonts!"
  4.    ClientHeight    =   4020
  5.    ClientLeft      =   1215
  6.    ClientTop       =   2025
  7.    ClientWidth     =   7830
  8.    Height          =   4710
  9.    Icon            =   LOOKHERE.FRX:0000
  10.    Left            =   1155
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   4020
  15.    ScaleWidth      =   7830
  16.    Top             =   1395
  17.    Width           =   7950
  18.    Begin OptionButton Option2 
  19.       Caption         =   "Partial Character Sets (Caps Only)"
  20.       Height          =   255
  21.       Left            =   360
  22.       TabIndex        =   9
  23.       Top             =   3360
  24.       Width           =   3255
  25.    End
  26.    Begin CommandButton Command2 
  27.       Caption         =   "Exit"
  28.       Height          =   495
  29.       Left            =   5880
  30.       TabIndex        =   5
  31.       Top             =   3120
  32.       Width           =   1215
  33.    End
  34.    Begin CommandButton Command1 
  35.       Caption         =   "Print"
  36.       Height          =   495
  37.       Left            =   4320
  38.       TabIndex        =   4
  39.       Top             =   3120
  40.       Width           =   1215
  41.    End
  42.    Begin OptionButton Option1 
  43.       Caption         =   "Font List (with samples)"
  44.       Height          =   255
  45.       Left            =   360
  46.       TabIndex        =   6
  47.       Top             =   3120
  48.       Value           =   -1  'True
  49.       Width           =   2295
  50.    End
  51.    Begin TextBox Text3 
  52.       Height          =   1455
  53.       Left            =   4080
  54.       TabIndex        =   8
  55.       Text            =   "Text3"
  56.       Top             =   1320
  57.       Width           =   3495
  58.    End
  59.    Begin TextBox Text2 
  60.       Height          =   1455
  61.       Left            =   240
  62.       TabIndex        =   7
  63.       Text            =   "Text2"
  64.       Top             =   1320
  65.       Width           =   3495
  66.    End
  67.    Begin ComboBox Combo4 
  68.       Height          =   300
  69.       Left            =   6480
  70.       TabIndex        =   3
  71.       Text            =   "Combo4"
  72.       Top             =   720
  73.       Width           =   1095
  74.    End
  75.    Begin ComboBox Combo3 
  76.       Height          =   300
  77.       Left            =   4080
  78.       Sorted          =   -1  'True
  79.       TabIndex        =   2
  80.       Text            =   "Combo3"
  81.       Top             =   720
  82.       Width           =   2175
  83.    End
  84.    Begin ComboBox Combo2 
  85.       Height          =   300
  86.       Left            =   2640
  87.       TabIndex        =   1
  88.       Text            =   "Combo2"
  89.       Top             =   720
  90.       Width           =   1095
  91.    End
  92.    Begin ComboBox Combo1 
  93.       Height          =   300
  94.       Left            =   240
  95.       Sorted          =   -1  'True
  96.       TabIndex        =   0
  97.       Text            =   "Combo1"
  98.       Top             =   720
  99.       Width           =   2175
  100.    End
  101.    Begin TextBox Text1 
  102.       Height          =   285
  103.       Left            =   2040
  104.       TabIndex        =   10
  105.       Text            =   "Text1"
  106.       Top             =   240
  107.       Width           =   3735
  108.    End
  109.    Begin Menu File 
  110.       Caption         =   "&File"
  111.       Begin Menu PrntCtl 
  112.          Caption         =   "&Print"
  113.       End
  114.       Begin Menu ExitCtl 
  115.          Caption         =   "E&xit"
  116.       End
  117.    End
  118.    Begin Menu HelpCtl 
  119.       Caption         =   "&Help"
  120.       Begin Menu Reg 
  121.          Caption         =   "&Registration Info"
  122.       End
  123.       Begin Menu AboutLook 
  124.          Caption         =   "&About"
  125.       End
  126.    End
  127. End
  128. Sub AboutLook_Click ()
  129.        About.Show MODAL
  130. End Sub
  131.  
  132. Sub Combo1_Click ()
  133.     Jacob$ = Combo1.Text
  134.     Text2.FontName = Jacob$
  135. End Sub
  136.  
  137. Sub Combo2_Change ()
  138.     Jacob$ = Combo2.Text
  139.     Text2.FontSize = Val(Jacob$)
  140. End Sub
  141.  
  142. Sub Combo2_Click ()
  143.     Jacob$ = Combo2.Text
  144.     Text2.FontSize = Val(Jacob$)
  145. End Sub
  146.  
  147. Sub Combo3_Click ()
  148.     Jacob$ = Combo3.Text
  149.     Text3.FontName = Jacob$
  150. End Sub
  151.  
  152. Sub Combo4_Change ()
  153.     Jacob$ = Combo4.Text
  154.     Text3.FontSize = Val(Jacob$)
  155. End Sub
  156.  
  157. Sub Combo4_Click ()
  158.     Jacob$ = Combo4.Text
  159.     Text3.FontSize = Val(Jacob$)
  160. End Sub
  161.  
  162. Sub Command1_Click ()
  163.     If Option1.Value Then
  164.     For I% = 0 To Printer.FontCount - 1
  165.         Printer.FontName = "Arial"
  166.         Printer.FontSize = 12
  167.         Printer.Print Combo1.List(I%); Tab(40);
  168.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  169.         Printer.Print "AaBbCcXxYyZz 12345?!&*,."
  170.     Next I%
  171.     Printer.EndDoc
  172.     ElseIf Option2.Value Then
  173.     For I% = 0 To Printer.FontCount - 1
  174.         Printer.FontName = "Arial"
  175.         Printer.FontSize = 12
  176.         Printer.Print Combo1.List(I%) ' Set font.
  177.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  178.         For J = 65 To 90
  179.         Printer.Print Chr$(J);
  180.         Next J
  181.         Printer.Print
  182.         Printer.Print
  183.     Next I%
  184.     Printer.EndDoc
  185.     End If
  186. End Sub
  187.  
  188. Sub Command2_Click ()
  189.     End
  190. End Sub
  191.  
  192. Sub ExitCtl_Click ()
  193.     End
  194. End Sub
  195.  
  196. Sub Form_Load ()
  197.     Combo1.Text = ""
  198.     Combo2.Text = "10"
  199.     Combo3.Text = ""
  200.     Combo4.Text = "10"
  201.     Text2.Text = "AaBbCcXxYyZz123!?&"
  202.     Text3.Text = "AaBbCcXxYyZz123!?&"
  203.     For I% = 0 To Printer.FontCount - 1
  204.     Combo1.AddItem Printer.Fonts(I%)  ' Print name of font.
  205.     Next I%
  206.     For I% = 6 To 36
  207.     Combo2.AddItem Str$(I%)
  208.     Next I%
  209.     For I% = 0 To Printer.FontCount - 1
  210.     Combo3.AddItem Printer.Fonts(I%)  ' Print name of font.
  211.     Next I%
  212.     Text1.Text = Str$(I%) + " fonts available to choose from."
  213.     For I% = 6 To 36
  214.     Combo4.AddItem Str$(I%)
  215.     Next I%
  216. End Sub
  217.  
  218. Sub PrntCtl_Click ()
  219.     If Option1.Value Then
  220.     For I% = 0 To Printer.FontCount - 1
  221.         Printer.FontName = "Arial"
  222.         Printer.FontSize = 12
  223.         Printer.Print Combo1.List(I%); Tab(40);
  224.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  225.         Printer.Print "AaBbCcXxYyZz 12345?!&*,."
  226.     Next I%
  227.     Printer.EndDoc
  228.     ElseIf Option2.Value Then
  229.     For I% = 0 To Printer.FontCount - 1
  230.         Printer.FontName = "Arial"
  231.         Printer.FontSize = 12
  232.         Printer.Print Combo1.List(I%) ' Set font.
  233.         Printer.FontName = Combo1.List(I%) ' Print name of font.
  234.         For J = 65 To 90
  235.         Printer.Print Chr$(J);
  236.         Next J
  237.         Printer.Print
  238.         Printer.Print
  239.     Next I%
  240.     Printer.EndDoc
  241.     End If
  242. End Sub
  243.  
  244. Sub Reg_Click ()
  245.    Money.Show MODAL
  246. End Sub
  247.  
  248.